if (priv->active_transition_type == GTK_STACK_TRANSITION_TYPE_SLIDE_DOWN)
y += allocation.height;
- if (priv->last_visible_surface)
+ if (priv->last_visible_surface &&
+ gtk_cairo_should_draw_window (cr, priv->view_window))
+
{
cairo_save (cr);
cairo_set_source_surface (cr, priv->last_visible_surface, x, y);
cairo_restore (cr);
}
- gtk_container_propagate_draw (GTK_CONTAINER (stack),
- priv->visible_child->widget,
- cr);
+ if (gtk_cairo_should_draw_window (cr, priv->bin_window))
+ gtk_container_propagate_draw (GTK_CONTAINER (stack),
+ priv->visible_child->widget,
+ cr);
}
static gboolean
GtkStackPrivate *priv = stack->priv;
cairo_t *pattern_cr;
- if (priv->visible_child &&
- gtk_cairo_should_draw_window (cr, priv->bin_window))
+ if (priv->visible_child)
{
if (priv->transition_pos < 1.0)
{
switch (priv->active_transition_type)
{
case GTK_STACK_TRANSITION_TYPE_CROSSFADE:
- gtk_stack_draw_crossfade (widget, cr);
+ if (gtk_cairo_should_draw_window (cr, priv->bin_window))
+ gtk_stack_draw_crossfade (widget, cr);
break;
case GTK_STACK_TRANSITION_TYPE_SLIDE_LEFT:
case GTK_STACK_TRANSITION_TYPE_SLIDE_RIGHT:
}
}
- else
+ else if (gtk_cairo_should_draw_window (cr, priv->bin_window))
gtk_container_propagate_draw (GTK_CONTAINER (stack),
priv->visible_child->widget,
cr);